﻿@namespace BootstrapBlazor.Components
@typeparam TValue
@inherits ValidateBase<TValue>

@if (IsShowLabel)
{
    <BootstrapLabel required="@Required" for="@Id" ShowLabelTooltip="ShowLabelTooltip" Value="@DisplayText" />
}
<div @attributes="AdditionalAttributes" class="@GetClassString()" aria-checked="@StateString">
    <input class="@InputClassString" type="checkbox" id="@Id" disabled="@Disabled" checked="@CheckedString" @onclick="@OnToggleClick" />
    @if (ShowAfterLabel && !string.IsNullOrEmpty(DisplayText))
    {
        <label class="form-check-label" for="@Id">@DisplayText</label>
    }
</div>
